package com.sinoglobal.sinostore.adapter;

import com.sinoglobal.sinostore.fragment.GoodsDetailFragment;
import com.sinoglobal.sinostore.fragment.GoodsWebFragment;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class GoodsFragmentAdapter extends FragmentPagerAdapter {

	public GoodsFragmentAdapter(FragmentManager fm) {
		super(fm);
	}

	@Override
	public Fragment getItem(int position) {
		Fragment fragment=null;
		switch (position) {
		case 0:
			fragment= GoodsDetailFragment.newInstance();
			break;

		case 1:
			fragment=GoodsWebFragment.newInstance();
			break;
		}
		return fragment;
	}

	@Override
	public int getCount() {
		return 2;
	}
}